<template>
    <div class="document-type-div">
        <el-select v-model="value" clearable @change="handleChange" :size="size" :disabled="disabled">
            <el-option :value="1000" label="采购申请单"></el-option>
            <el-option :value="1001" label="采购订单"></el-option>
            <el-option :value="1002" label="采购入库单"></el-option>
            <el-option :value="4001" label="付款申请单"></el-option>
            <el-option :value="4002" label="付款单"></el-option>
        </el-select>
    </div>
</template>
<script>
export default {
    data() {
        return {
            value: []
        }
    },
    model: {
        prop: "documentType",
        event: "innerChange",
    },
    methods: {
        handleChange(value) {
            this.$emit("innerChange", value);
            this.$emit("change", value);
        }
    },
    mounted() {

    },
    watch: {
        documentType: {
            handler(value) {
                this.value = value;
            }
        }
    },
    props: {
        size: {
            type: String
        },
        documentType: {
            type: Number,
            default: null
        },
        disabled: {
            type: Boolean,
            default: false
        }
    }
}
</script>
<style scoped>
.document-type-div {
    width: 200px;
    display: inline-block;
}
</style>